<script>
    $(document).ready(function() {
        
        document.getElementById('hdnval').disabled = true;
//        
//        $('input[type="checkbox"]').attr("checked", false);
//        
        $('#chkall').click(function() {
            var status = this.checked;                                    
            
            $('input[type="checkbox"]').each(function() {
                this.checked = status;                 
            });
            
            if (true === status) document.getElementById('hdnval').disabled = true;
        });
        
        $('.prntchk').click(function() {
            var parent = $(this).parent();
            var children = parent.find('ul li').children();
            var status = this.checked;                        
            
            children.each(function() {
                this.checked = status;
            });
            
            if (true === status) document.getElementById('hdnval').disabled = true;
        });
    });    
</script>
<div class="">
    <div class="notice" style="display: none"></div>
    <div class="headtitle">ACL</div>
    <form id="form_edit_acl">
        <input type="hidden" name="groupid" value="<?php echo $this->data['groupID']; ?>"/>        
        <table class="striped" style="width: 500px">
            <thead>
            <th><h4>Group : <?php echo $this->data['group_name']; ?></h4></th>
            </thead>        
            <tbody>            
                <?php                    
                    echo $this->MenuList(array('a.groupID = ?' => $this->data['groupID']));
                ?>
            <tr>
                <td colspan="2"><strong>Notes: need re-login to take changes.</strong></td>
            </tr>
            </tbody>
        </table> 
    </form>
</div>